home *** CD-ROM | disk | FTP | other *** search
/ Softdisk for Windows 42 / Softdisk for Windows 42.iso / QUARRY / QUARRY.EXE / QUARRY.dxr / 00029_CHECKMOVERED.ls < prev    next >
Encoding:
Text File  |  1998-01-01  |  3.4 KB  |  130 lines

  1. on CHECKMOVERED
  2.   global GN, GRIDV, GRIDY, GRIDH, MV, MVV, GNN, STARTED, EXITROW, MANBH, MANBY, TMP, SOND, ZZ, ZZZ, DT
  3.   set MVV to 1
  4.   if getAt(GRIDH, GN) = getAt(GRIDH, 1) then
  5.     exit
  6.   end if
  7.   if (getAt(GRIDH, GN) = getAt(GRIDH, 1)) and (getAt(GRIDV, GN - 1) <> 0) then
  8.     exit
  9.   end if
  10.   repeat while (getAt(GRIDY, GN) <> getAt(GRIDY, 140)) and (MVV = 1)
  11.     if getAt(GRIDV, GN + 14) = 0 then
  12.       set the locH of sprite 9 to getAt(GRIDH, GN)
  13.       set the locV of sprite 9 to getAt(GRIDY, GN)
  14.       updateStage()
  15.       set the locH of sprite 9 to -50
  16.       set the locV of sprite 9 to -50
  17.       updateStage()
  18.       setAt(GRIDV, GN, 0)
  19.       set GN to GN + 14
  20.       CHANGEREDROLL()
  21.       set the locH of sprite 29 to getAt(GRIDH, GN)
  22.       set the locV of sprite 29 to getAt(GRIDY, GN)
  23.       setAt(GRIDV, GN, 3)
  24.       if STARTED <> 0 then
  25.         set the castNum of sprite 29 to 90
  26.         updateStage()
  27.         if SOND = 0 then
  28.           puppetSound("FALL")
  29.         end if
  30.         updateStage()
  31.       end if
  32.       if STARTED <> 0 then
  33.         set DT to 12
  34.         COUNTTIME()
  35.         set DT to 3
  36.       end if
  37.       set the castNum of sprite 29 to 4
  38.       updateStage()
  39.       set MV to 1
  40.       REMOVESPRITE()
  41.     end if
  42.     if getAt(GRIDY, GN) = getAt(GRIDY, 14) then
  43.       set MVV to 0
  44.     end if
  45.     if (MVV = 1) and (getAt(GRIDV, GN + 14) <> 0) then
  46.       set MVV to 0
  47.     end if
  48.   end repeat
  49.   if STARTED = 0 then
  50.     set ZZ to 1
  51.   end if
  52.   if STARTED = 1 then
  53.     set ZZ to 9
  54.   end if
  55.   if STARTED = 0 then
  56.     set ZZZ to 36
  57.   end if
  58.   if STARTED = 1 then
  59.     set ZZZ to 4
  60.   end if
  61.   if getAt(GRIDH, GN) = getAt(GRIDH, 1) then
  62.     exit
  63.   end if
  64.   if getAt(GRIDV, GN - 1) = 0 then
  65.     if (STARTED <> 0) and (SOND = 0) then
  66.       puppetSound("STEP")
  67.     end if
  68.     set GNN to getAt(GRIDH, GN)
  69.     repeat with i = 1 to ZZ
  70.       if STARTED = 0 then
  71.         set the locH of sprite 9 to GNN
  72.         set the locV of sprite 9 to getAt(GRIDY, GN)
  73.         updateStage()
  74.       end if
  75.       set GNN to GNN - ZZZ
  76.       CHANGEREDROLL()
  77.       set the locH of sprite 29 to GNN
  78.       set the locV of sprite 29 to getAt(GRIDY, GN)
  79.       updateStage()
  80.       if STARTED = 1 then
  81.         set DT to 2
  82.         COUNTTIME()
  83.       end if
  84.     end repeat
  85.     set the castNum of sprite 29 to 4
  86.     set the locH of sprite 9 to -50
  87.     set the locV of sprite 9 to -50
  88.     setAt(GRIDV, GN, 0)
  89.     set GN to GN - 1
  90.     setAt(GRIDV, GN, 3)
  91.     set MV to 1
  92.     updateStage()
  93.     if getAt(GRIDH, GN) = getAt(GRIDH, 1) then
  94.       set TMP to 1
  95.       set EXITROW to 0
  96.       repeat with X = 1 to 10
  97.         if GN = TMP then
  98.           set EXITROW to X
  99.         end if
  100.         set TMP to TMP + 14
  101.         if EXITROW <> 0 then
  102.           exit repeat
  103.         end if
  104.       end repeat
  105.       setAt(GRIDV, GN, 0)
  106.       set MANBH to getAt(GRIDH, GN)
  107.       set MANBY to getAt(GRIDY, GN)
  108.       REMOVESPRITE()
  109.       MOTORBLUE()
  110.     end if
  111.   end if
  112.   if (GN < 136) and (GN > 1) and (STARTED <> 0) then
  113.     if (getAt(GRIDV, GN + 14) = 2) and (getAt(GRIDV, GN - 1) = 0) then
  114.       if SOND = 0 then
  115.         puppetSound("BOING")
  116.       end if
  117.       updateStage()
  118.       set the locH of sprite 10 to getAt(GRIDH, GN + 14)
  119.       set the locV of sprite 10 to getAt(GRIDY, GN + 14)
  120.       set the castNum of sprite 10 to 91
  121.       updateStage()
  122.       set DT to 12
  123.       COUNTTIME()
  124.       set the castNum of sprite 10 to 12
  125.       updateStage()
  126.     end if
  127.   end if
  128.   REMOVESPRITE()
  129. end
  130.